{
Alisa_Barkar
10/10/12
}
program Spisok;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  pelement=^element;
  element=record
    value: integer;
    next:pelement;
  end;
var
  mass: array of element;
  fin:textFile;
  n, i:integer;
  current, head:pelement;
begin
  assign (fin, 'input.txt');
  reset(fin);
  readln(fin, n);
  setlength (mass, n);
  for i:=0 to n-1 do
    readln(fin, mass[i].value);
  closeFile(fin);
  head:=@mass[0];
  for i:=0 to n-2 do
  begin
    mass[i].next:=@mass[i+1].value;
  end;
  mass[n-1].next:=nil;
  current:=head;
  while (current<>nil) do
  begin
    writeln(current^.value);
    current:=current^.next;
  end;

end.
